package com.rich.domain;

import java.util.Map;

/**
 * 购物项
 * @author zhang
 *
 */
public class Cartitem {
	private Product product;
	private Integer count;
	private Double subtotal;
	public Product getProduct() {
		return product;
	}
	public void setProduct(Product product) {
		this.product = product;
	}
	public Integer getCount() {
		return count;
	}
	public void setCount(Integer count) {
		this.count = count;
	}
	/**
	 * 获取商品小计
	 * @return
	 */
	public Double getSubtotal() {
		return product.getShop_price() * count;
	}
	public void setSubTotal(Double subtotal) {
		this.subtotal = subtotal;
	}
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return super.toString();
	}
	
	public Cartitem() {
	}
	
	public Cartitem(Product product, Integer count) {
		this.product = product;
		this.count = count;
	}
	
}
